package dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import valid.ValidGroupOne;
import valid.ValidGroupThree;
import valid.ValidGroupTwo;



@Data
public class UserDto {
    /**
     * 1
     */
    @NotBlank(message = "请输入姓名", groups = ValidGroupOne.class)
    private String userName;

    /**
     * 2
     */
    @NotNull(message = "请输入年龄", groups = ValidGroupTwo.class)
    private Integer age;

    /**
     * 2
     */
    @NotBlank(message = "请输入密码", groups = ValidGroupTwo.class)
    private String password;

    /**
     * 3
     */
    @NotBlank(message = "请输入地址", groups = ValidGroupThree.class)
    private String address;

    @NotBlank(message = "请输入邮箱")
    private String email;

    private String phone;
}
